Integrand size = 27, antiderivative size = 336 \[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\frac {(b c-3 d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (9-b^2\right ) f (3+b \sin (e+f x))}+\frac {(b c-3 d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{b \left (9-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (6 b c d+9 d^2-b^2 \left (c^2+2 d^2\right )\right ) \operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{b^2 \left (9-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {(b c-3 d) \left (6 b c+9 d-3 b^2 d\right ) \operatorname {EllipticPi}\left (\frac {2 b}{3+b},\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(3-b) b^2 (3+b)^2 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
Time = 0.69 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.04, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2878, 3138, 2734, 2732, 3081, 2742, 2740, 2886, 2884} \[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\frac {\left (a^2 d^2+2 a b c d-\left (b^2 \left (c^2+2 d^2\right )\right )\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \operatorname {EllipticF}\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 d}{c+d}\right )}{b^2 f \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{f \left (a^2-b^2\right ) (a+b \sin (e+f x))}+\frac {(b c-a d) \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{b f \left (a^2-b^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {(b c-a d) \left (a^2 d+2 a b c-3 b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 d}{c+d}\right )}{b^2 f (a-b) (a+b)^2 \sqrt {c+d \sin (e+f x)}} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2878
Rule 2884
Rule 2886
Rule 3081
Rule 3138
Rubi steps \begin{align*} \text {integral}& = \frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\int \frac {\frac {1}{2} \left (3 b c d-a \left (2 c^2+d^2\right )\right )-d (a c-b d) \sin (e+f x)-\frac {1}{2} d (b c-a d) \sin ^2(e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{-a^2+b^2} \\ & = \frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\int \frac {\frac {1}{2} d \left (a^2 c d-3 b^2 c d+a b \left (c^2+d^2\right )\right )+\frac {1}{2} d \left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) \sin (e+f x)}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{b \left (a^2-b^2\right ) d}+\frac {(b c-a d) \int \sqrt {c+d \sin (e+f x)} \, dx}{2 b \left (a^2-b^2\right )} \\ & = \frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {\left ((b c-a d) \left (2 a b c+a^2 d-3 b^2 d\right )\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)}} \, dx}{2 b^2 \left (a^2-b^2\right )}+\frac {\left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{2 b^2 \left (a^2-b^2\right )}+\frac {\left ((b c-a d) \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{2 b \left (a^2-b^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}} \\ & = \frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {(b c-a d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{b \left (a^2-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left ((b c-a d) \left (2 a b c+a^2 d-3 b^2 d\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{(a+b \sin (e+f x)) \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 b^2 \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}}+\frac {\left (\left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{2 b^2 \left (a^2-b^2\right ) \sqrt {c+d \sin (e+f x)}} \\ & = \frac {(b c-a d) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{\left (a^2-b^2\right ) f (a+b \sin (e+f x))}+\frac {(b c-a d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{b \left (a^2-b^2\right ) f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (2 a b c d+a^2 d^2-b^2 \left (c^2+2 d^2\right )\right ) \operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{b^2 \left (a^2-b^2\right ) f \sqrt {c+d \sin (e+f x)}}+\frac {(b c-a d) \left (2 a b c+a^2 d-3 b^2 d\right ) \operatorname {EllipticPi}\left (\frac {2 b}{a+b},\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(a-b) b^2 (a+b)^2 f \sqrt {c+d \sin (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 6.63 (sec) , antiderivative size = 870, normalized size of antiderivative = 2.59 \[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\frac {(-b c \cos (e+f x)+3 d \cos (e+f x)) \sqrt {c+d \sin (e+f x)}}{\left (-9+b^2\right ) f (3+b \sin (e+f x))}+\frac {-\frac {2 \left (-12 c^2+5 b c d-3 d^2\right ) \operatorname {EllipticPi}\left (\frac {2 b}{3+b},\frac {1}{2} \left (-e+\frac {\pi }{2}-f x\right ),\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{(3+b) \sqrt {c+d \sin (e+f x)}}-\frac {2 i \left (-12 c d+4 b d^2\right ) \cos (e+f x) \left ((b c-3 d) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )+3 d \operatorname {EllipticPi}\left (\frac {b (c+d)}{b c-3 d},i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )\right ) \sqrt {\frac {d-d \sin (e+f x)}{c+d}} \sqrt {-\frac {d+d \sin (e+f x)}{c-d}} (-b c+3 d+b (c+d \sin (e+f x)))}{b (b c-3 d) d^2 \sqrt {-\frac {1}{c+d}} (3+b \sin (e+f x)) \sqrt {1-\sin ^2(e+f x)} \sqrt {-\frac {c^2-d^2-2 c (c+d \sin (e+f x))+(c+d \sin (e+f x))^2}{d^2}}}-\frac {2 i \left (b c d-3 d^2\right ) \cos (e+f x) \cos (2 (e+f x)) \left (2 b (b c-3 d) (c-d) E\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right )|\frac {c+d}{c-d}\right )+d \left (2 (3+b) (b c-3 d) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )-\left (-18+b^2\right ) d \operatorname {EllipticPi}\left (\frac {b (c+d)}{b c-3 d},i \text {arcsinh}\left (\sqrt {-\frac {1}{c+d}} \sqrt {c+d \sin (e+f x)}\right ),\frac {c+d}{c-d}\right )\right )\right ) \sqrt {\frac {d-d \sin (e+f x)}{c+d}} \sqrt {-\frac {d+d \sin (e+f x)}{c-d}} (-b c+3 d+b (c+d \sin (e+f x)))}{b^2 (b c-3 d) d \sqrt {-\frac {1}{c+d}} (3+b \sin (e+f x)) \sqrt {1-\sin ^2(e+f x)} \left (-2 c^2+d^2+4 c (c+d \sin (e+f x))-2 (c+d \sin (e+f x))^2\right ) \sqrt {-\frac {c^2-d^2-2 c (c+d \sin (e+f x))+(c+d \sin (e+f x))^2}{d^2}}}}{4 (-3+b) (3+b) f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(1026\) vs. \(2(439)=878\).
Time = 5.31 (sec) , antiderivative size = 1027, normalized size of antiderivative = 3.06
[In]
[Out]
Timed out. \[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\int { \frac {{\left (d \sin \left (f x + e\right ) + c\right )}^{\frac {3}{2}}}{{\left (b \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\int { \frac {{\left (d \sin \left (f x + e\right ) + c\right )}^{\frac {3}{2}}}{{\left (b \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(c+d \sin (e+f x))^{3/2}}{(3+b \sin (e+f x))^2} \, dx=\int \frac {{\left (c+d\,\sin \left (e+f\,x\right )\right )}^{3/2}}{{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2} \,d x \]
[In]
[Out]